package com.ys.enume.sys;

public class SysColFormEnum {
	// 字段类型
	public enum Type {
		TEXT("文本框", 1),
		SELECTOR_DROPDOWN("选择框(下拉)", 2),
		HYPE_TEXT("富文本", 3),
		IMG("图片", 4),
		DATE_YYMMDD_HH_mm_ss("日期", 5),
		DATE_YYMMDD_00_00_00("日期", 6),
		DATE_YYMMDD_23_59_59("日期", 7),
		SELECTOR_MODAL("选择框(弹出型)", 8),
		TEXTAREA("文本框（大）", 9),
		BOOLEAN("布尔框", 10),
		FILE("文件", 11),
		DATE_YYMMDD("日期YMD", 12),
		SELECTOR_SWITCH("选择框(转换)", 13),
		RADIO("单选框", 14),
		CHECKBOX("复选框", 15),
		SELECTOR_ALERT("选择框(弹出框)", 16);
		public String name;
		public Integer value;

		private Type(String name, Integer value) {
			this.name = name;
			this.value = value;
		}

		public static String getName(int value) {
			for (Type e : Type.values()) {
				if (e.value == value) {
					return e.name;
				}
			}

			return "";
		}
	}
	
	// 是否新增
	public enum StateAdd {
		NO("否", 0), YES("是", 1);
		public String name;
		public Integer value;

		private StateAdd(String name, Integer value) {
			this.name = name;
			this.value = value;
		}
	}
	
	// 是否编辑
	public enum StateEdit {
		NO("否", 0), YES("是", 1);
		public String name;
		public Integer value;

		private StateEdit(String name, Integer value) {
			this.name = name;
			this.value = value;
		}
	}
}
